<template>
	<b-layout-index>
		<view  :style="{ '--colorPrimary': color.primary }">
	<navbar  :title="title"></navbar>
		<view class="bgbbw">
	
			<u-cell-group>
				<u-cell v-for="(item,index) in datalist"   :label="$t('业绩金额')"
				   isLink
					    :url="'list?name='+item.date+'&userId='+userId"
				>
					<view slot="title">
						 <u--text :color="color.primary" :bold="true" size="16" mode="price" :text="(item.price)"></u--text>
					</view>
					<view slot="value">{{item.date}}</view>
				</u-cell>
	
			</u-cell-group>

		</view>
		</view>

	</b-layout-index>
</template>

<script>
	import {
		findByIncomeAndExpenses,
		findByMyList,
		findByPerListWallet,
		findByPerUserWallet
	} from "@/api/userWallet.js"
	export default {

		data() {
			return {
				show: false,
				value1: Number(new Date()),
				datalist:[],
				userId:0,
				title:this.$t('业绩统计')

			}
		},
		onLoad: function(options) {
			console.log(options)
			this.userId=options.userId || 0
			this.title=options.name || this.$t('业绩统计')
			this.findByPerUserList()

		},


		methods: {
			findByPerUserList: function() {
				//findByPerUserWallet
				findByPerListWallet(this.userId).then(res => {
					this.datalist = res

				})

			},


		}
	}
</script>

<style lang="scss">
	.w100 {
		width: 110px;
	}

	.btn {
		background-color: var(--color-primary);
		text-align: center;
		color: #fff;
	}

	.flex {
		display: flex;
		justify-content: space-between;
	}

	.grid {
		box-shadow: 0 0 4px 1px #eee;
		text-align: center;
	}

	.grid1 {
		background-color: var(--color-primary);
		color: #fff;
	}

	.grid2 {
		background-color: $u-warning;
		color: #fff;
	}
	.primarycolor{
			color: var(--color-primary);
	}
.priceColor{
			color: var(--color-primary);
			font-weight: bold;
			font-size: 24px;
	}
	.color {
		background-image: linear-gradient(to bottom, var(--color-primary), var(--color-primary), #ffffff, #eeeeee);
	}

	.m {
		margin-top: 100px;
	}

	.bgbbw {
		background-color: #ffffffa6;
	}

	.icon {
		width: 40px;
		height: 40px;
		background-color: #EEEEEE;
		margin-left: 5px;
		margin-right: 5px;
		border-radius: 100%;
	}
</style>